* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/*Background*/
body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    margin: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 4rem;
    overflow: hidden;
    position: relative;
    background: url("/Images/bgoflogin.png");
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

.background-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
}


/*Glass Container*/
.register-container {
    width: 420px;
    padding: 42px;
    border-radius: 28px;
    background: rgba(18, 12, 38, 0.85);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    border: 1px solid rgba(168, 85, 247, 0.35);
    box-shadow: 
        0 20px 50px rgba(0, 0, 0, 0.55),
        inset 0 1px 1px rgba(255, 255, 255, 0.05);
    color: #fff;
    text-align: center;
    position: relative;
    z-index: 2;
}

form {
    text-align: left;
}

label {
    display: block;
    font-size: 13px;
    opacity: 0.85;
}

/*Title*/
.subtitle {
    font-size: 14px;
    opacity: 0.75;
    margin-bottom: 32px;
}

/*Input Fields*/
.google-btn {
    width: 100%;
    padding: 14px;
    border-radius: 14px;
    background: transparent;
    border: 1.5px solid rgba(168, 85, 247, 0.35);
    color: #fff;
    cursor: pointer;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
}

.google-btn img {
    width: 18px;
    margin-right: 8px;
    vertical-align: middle;
}

/*Inputs*/
input {
    width: 100%;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1.5px solid rgba(168, 85, 247, 0.35);
    background: rgba(255, 255, 255, 0.04);
    color: white;
    outline: none;
    font-size: 14px;
    transition: border 0.25s, box-shadow 0.25s;
    text-align: left;
}

input:focus{
    border-color: #a855f7;
    box-shadow: 0 0 0 1px rgba(168, 85, 247, 0.3);
}

input::placeholder {
    color: #c6c6c6;
}

/*Options*/
.options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 6px;
    margin-bottom: 22px;
    font-size: 13px;
}

.rememberMe {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rememberMe label {
    line-height: 1;
    margin: 0;
    font-size: 13px;
    cursor: pointer;
}

.rememberMe input[type="checkbox"] {
    width: 14px;
    height: 14px;
    accent-color: #a855f7;
    cursor: pointer;
    margin: 0;
    vertical-align: middle;
}

.forgot {
    color: #a855f7;
    text-decoration: none;
    line-height: 1;
    display: flex;
    align-items: center;
}

.forgot:hover {
    text-decoration: underline;
}

/*Register Button*/
.regis-btn {
    width: 100%;
    padding: 14px;
    border-radius: 14px;
    background: linear-gradient(135deg, #8b63ff, #a855f7);
    border: none;
    color: #fff;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    box-shadow: 0 12px 30px rgba(139, 99, 255, 0.45);
    transition: transform 0.2s, box-shadow 0.2s;
    margin-top: 12px;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 40px rgba(139, 99, 255, 0.6);
}

/*Register*/
.register {
    margin-top: 20px;
}

.register a {
    color: #a47bff
}

h1 {
    font-size: 36px;
    margin-bottom: 6px;
    font-weight: 700;
}

.particles {
    position: absolute;
    inset: 0;
    opacity: 0.7;
    z-index: 1;
    height: 100%;
    width: 100%;
}

.particle {
    position: absolute;
    width: 6px;
    height: 8px;
    background: rgba(168, 85, 247, 0.35);
    border-radius: 50%;
    filter: blur(1px);
    animation: floatParticle linear infinite;
}

@keyframes floatParticle {
    0% {
        transform: translateY(0) translateX(0);
        opacity: 0.2;
    }
    50% {
        opacity: 0.6;
    }
    100% {
        transform: translateY(-120vh) translateX(30px);
        opacity: 0;
    }
}

/*Password*/

.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-wrapper input {
    margin-bottom: 0;
    padding-right: 48px;
}

.toggle-password {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.75);
    user-select: none;
    z-index: 5;
}

.toggle-password:hover {
    color: #a855f7;
    text-shadow: 0 0 8px rgba(168, 85, 247, 0.6);
}

.error {
    border-color: #ff4d6d !important;
    box-shadow: 0 0 0 1px rgba(255, 77, 109, 0.4);
}

.error-text {
    color: #ff4d6d;
    font-size: 12px;
    line-height: 1.3;
}

.error-container {
    display: block;
    font-size: 12px;
    color: #ff4d6d;
    margin-top: 4px;
    min-height: 14px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 10px;
}

.field.has-error .error-container {
    display: block;
}

label,
input,
.password-wrapper {
    margin-bottom: 0;
}

.field label {
    padding-bottom: 4px;
}

.field input {
    margin-bottom: 0;
}

.password-strength {
    margin-top: 4px;
    height: 0;
    overflow: hidden;
    transition: height 0.25s ease;
}

.password-strength.active {
    height: auto;
}

.strength-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 6px;
    overflow: hidden;
}

.strength-fill {
    height: 100%;
    width: 0;
    transition: width 0.3s ease, background-color 0.3s ease;
    border-radius: 6px;
    display: block;
}

.strength-fill.weak {
    width: 33%;
    background: #ff4d6d;
}

.strength-fill.medium {
    width: 66%;
    background: #facc15;
}

.strength-fill.strong {
    width: 100%;
    background: #22c55e;
}

.strength-text {
    display: block;
    margin-top: 4px;
    font-size: 12px;
}

.strength-text.weak {
    color: #ff4d6d;
}

.strength-text.medium {
    color: #facc15;
}

.strength-text.strong {
    color: #22c55e;
}

/* TABLET AND MOBILE RESPONSIVE */

@media (max-width: 1024px) {
    body {
        justify-content: center;
        padding: 2rem;
    }
}

@media (max-width: 768px) {
    body {
        justify-content: center;
        padding: 1rem;
    }

    .login-container {
        width: 100%;
        max-width: 420px;
        padding: 32px 24px;
    }

    h1 {
        font-size: 28px;
    }

    .google-btn,
    .login-btn {
        padding: 14px;
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .login-container {
        padding: 28px 20px;
        border-radius: 22px;
    }

    h1 {
        font-size: 24px;
    }

    .subtitle {
        font-size: 13px;
    }
}

/* Hide browser default password reveal icon */
input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear {
    display: none;
}

input[type="password"]::-webkit-credentials-auto-fill-button,
input[type="password"]::-webkit-clear-button,
input[type="password"]::-webkit-inner-spin-button {
    display: none !important;
}
